package com.inspur.gs.fssp.fssc.robxd.robxd.back.robxd.entityactions;
import com.inspur.edp.cef.api.message.*;
import com.inspur.edp.bef.api.action.determination.*;
import com.inspur.edp.bef.api.action.validation.*;
import com.inspur.edp.cef.entity.changeset.*;
import com.inspur.edp.bef.api.be.*;
import com.inspur.edp.bef.api.action.VoidActionResult;
import com.inspur.edp.bef.spi.action.RootAbstractAction;
import com.inspur.edp.bef.spi.action.AbstractAction;
import com.inspur.edp.cef.entity.entity.IEntityData;

public class ROBXDAduitAction extends RootAbstractAction<String> {
	private String flag;
	public ROBXDAduitAction(IBENodeEntityContext beContext, String flag) {
		super(beContext);
		this.flag = flag;
	}


	@Override
	public  void execute() {
		IEntityData data=this.getData();
		if(flag.equals("0"))
		{
			//给自己定义的枚举赋值，直接复制编号值就行
			data.setValue("AuditStatus","None");
		}
		else if(flag.equals("1"))
		{
			data.setValue("AuditStatus","Passed");
		}
		else if(flag.equals("2")) {
			data.setValue("AuditStatus", "Reject");
		}

	}
	private IEntityData getData() {
		return (IEntityData)getBEContext().getCurrentData();
	}
}